
<div class="col-sm-12 mt20">
    
    <div class="panel panel-default">
      <div class="panel-body">
        <div class="col-sm-2">
          <input type="text" class="form-control" placeholder="模板名称" ng-model="info.law_title">
        </div>
        <div class="col-sm-2">
            <div class="form-group">
                    <select class="form-control" ng-model="info.type" >
                        <option value="">请选择模板类别</option>
                        <option ng-value="info.value" ng-repeat="info in typelist">{{info.key}}</option>
                    </select>
             </div>
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date.lable" is-open="date.opened"
                ng-click="dateOpen($event, date)" placeholder="开始时间" ng-required="true"  close-text="关闭" current-text="今天" clear-text="清除"  />
        </div>
        <div class="col-sm-2">
            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date1.lable" is-open="date1.opened"
                ng-click="dateOpen1($event, date1)" placeholder="结束时间" ng-required="true" close-text="关闭" current-text="今天" clear-text="清除" />						
        </div>
          
          <div class="col-sm-2">
              <button class="btn btn-info search btn-block" ng-click="search(1)">立即搜索</button>
          </div>
          <div class="col-sm-2">
              <button class="btn btn-info search btn-block" ng-click="saveTemplan()">创建</button>
          </div>
       
      </div>
  
      <div class="panel-body">
        <table class="table table-striped table-bordered dataTable table-condensed tree_table" style="table-layout:fixed">
          <thead>
            <tr>
              <th class="text-center col-sm-2">模板名称</th>
              <th class="text-center col-sm-1">类型</th>
              <th class="text-center col-sm-2">创建时间</th>
              <th class="text-center col-sm-1">状态</th>
              <th class="text-center col-sm-2">操作</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="info in list">
              <td class="text-center">{{info.templan_title}}</td>
              <td class="text-center">{{info.type_name}}</td>
              <td class="text-center">{{info.create_time}}</td>
              <td class="text-center">{{info.state_name}}</td>
              <td class="text-center">
               
                <button type="button" class="btn btn-info btn-xs" ng-click="updateup(info)"  ng-if="info.state == 0">发布</button>
                <button type="button" class="btn btn-info btn-xs" ng-click="updateup(info)"  ng-if="info.state == 2">再次发布</button>
                <button type="button" class="btn btn-info btn-xs" ng-click="updatedown(info)"  ng-if="info.state == 1">停止发布</button>
                <button type="button" class="btn btn-info btn-xs" ng-click="saveTemplan(info)" ng-if="info.state != 1">修改</button>
                <button type="button" class="btn btn-danger btn-xs" ng-click="delete(info)" ng-if="info.state != 1">删除</button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
  
      <div class="text-right" style="background-color: white; margin-right: 30px">
        <pagination total-items="totalItems" ng-model="currentPage" ng-change="search(currentPage)" previous-text="上一页"
          next-text="下一页" first-text="首页" last-text="尾页" max-size="5" boundary-links="true" rotate="false"
          items-per-page="itemsPerPage" class="m-t-none m-b"></pagination>
      </div>
  
    </div>
  </div>